import java.time.Duration;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Scanner;

class Account{
    public int id = 0;
    public double balance = 0;
    public double annualInterestRate = 0;
    public Date dateCreated = new Date();
    public Account(int id, double balance) {
        this.id = id;
        this.balance = balance;
    }
    public Account() {
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    public double getBalance() {
        return balance;
    }
    public void setBalance(double balance) {
        this.balance = balance;
    }
    public double getAnnualInterestRate() {
        return annualInterestRate;
    }
    public void setAnnualInterestRate(double annualInterestRate) {
        this.annualInterestRate = annualInterestRate;
    }
    public Date getDateCreated() {
        return dateCreated;
    }
    public double getMonthlyInterestRate(){
        return this.annualInterestRate / 12.0;
    }
    public void withDraw(double x){
        this.balance -= x;
        System.out.println("已提取：" + x + "元,余额：" + this.balance + "元");
    }
    public void deposit(double x){
        this.balance += x;
        System.out.println("已存入：" + x + "元,余额：" + this.balance + "元");
    }
}

class Fan{
    static int SLOW = 1;
    static int MEDIUM = 2;
    static int FAST = 3;
    public int speed = this.SLOW;
    public boolean on = false;
    public double radius = 5;
    public String color = "blue";

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public boolean isOn() {
        return on;
    }

    public void setOn(boolean on) {
        this.on = on;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public Fan() {
    }
    public String toString(){
        if(this.on){
            return "风扇速度：" + this.speed + "\n    颜色："
                    + this.color + "\n    半径：" + this.radius;
        }else{
            return "fan is off\n风扇颜色："
                    + this.color + "\n    半径：" + this.radius;
        }
    }
}

class RegularPolygon{
    public int n = 3;
    public double side = 1;
    public double x = 0;
    public double y = 0;

    public RegularPolygon() {
    }

    public RegularPolygon(int n, double side) {
        this.n = n;
        this.side = side;
    }

    public RegularPolygon(int n, double side, double x, double y) {
        this.n = n;
        this.side = side;
        this.x = x;
        this.y = y;
    }

    public int getN() {
        return n;
    }

    public void setN(int n) {
        this.n = n;
    }

    public double getSide() {
        return side;
    }

    public void setSide(double side) {
        this.side = side;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }
    public double getPerimeter(){
        return this.n * this.side;
    }
    public double getArea(){
        return (this.n * Math.pow(this.side, 2)) /
                (4 * Math.tan(3.14 / this.n));
    }
}

class QuadraticEquation{
    public int a;
    public int b;
    public int c;
    public QuadraticEquation(int a, int b, int c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    public int getA() {
        return a;
    }

    public int getB() {
        return b;
    }

    public int getC() {
        return c;
    }
    public double getDiscriminant(){
        return Math.pow(b, 2) - 4 * a * c;
    }
    public double getRoot1(){
        if(this.getDiscriminant() >= 0){
            return (-b + Math.sqrt(this.getDiscriminant())) / 2 * a;
        }else{
            return 0;
        }
    }
    public double getRoot2(){
        if(this.getDiscriminant() >= 0){
            return (-b - Math.sqrt(this.getDiscriminant())) / 2 * a;
        }else{
            return 0;
        }
    }
}
class StopWatch{
    public LocalDateTime startTime;
    public LocalDateTime endTime;

    public StopWatch() {
        this.startTime = LocalDateTime.now();
    }
    public void start(){
        this.startTime = LocalDateTime.now();
    }
    public void stop(){
        this.endTime = LocalDateTime.now();
    }
    public long getElapsedTime(){
        return Duration.between(this.startTime,this.endTime).toMillis();
    }
}
class MyInteger{
    public int n ;
    public void setN(int n) {
        this.n = n;
    }

    public MyInteger() {
    }
    public boolean isEven(){
        return this.n % 2 == 0;
    }
    public boolean isOdd(){
        return this.n % 2 == 1;
    }
    public boolean isPrime(){
        for(int i = 2; i < Math.sqrt(this.n); i++){
            if (this.n % i == 0){
                return false;
            }
        }
        return true;
    }
}

public class test_5_5 {
    public static void password(String n) {
        int count = 0;
        int a = 0;
        if (n.length() < 8) {
            System.out.println("Invalid Password");
        } else {
            for (int i = 0; i < n.length(); i++) {
                if (Character.isDigit(n.charAt(i))) {
                    count++;
                }
                if (!(Character.isDigit(n.charAt(i)) ||
                        ((n.charAt(i) >= 65 && n.charAt(i) <= 90)
                                || (n.charAt(i) >= 97 && n.charAt(i) <= 122)))) {
                    a = 1;
                    break;
                }
            }
            if (count < 2 && a == 0) {
                System.out.println("Valid Password");
            } else {
                System.out.println("Invalid Password");
            }
        }
    }
    public static int count(String str,char  a){
        int count = 0;;
        for(int i = 0; i < str.length(); i++){
            if (str.charAt(i) == a){
                count++;
            }
        }
        return count;
    }

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
    }
    public static void main10(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.nextLine();
        password(str);
    }
    public static void main9(String[] args) {
        Scanner in = new Scanner(System.in);
        int k = in.nextInt();
        String tem = Integer.toBinaryString(k);
        System.out.println(tem);
    }
    public static void main8(String[] args) {
        Scanner in = new Scanner(System.in);
        int k=in.nextInt();
        int tem=Integer.parseInt(String.valueOf(k),2);
        String ret = Integer.toHexString(tem).toUpperCase();
        System.out.println(ret);
    }
    public static void main7(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        String a = String.valueOf(n);
        System.out.println("其十六进制为：" + Integer.toHexString(n));
    }
    public static void main6(String[] args) {
        MyInteger s = new MyInteger();
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        s.setN(n);
        if(s.isOdd()){
            System.out.println(s.n + "是奇数");
        }
        if(s.isEven()){
            System.out.println(s.n + "是偶数");
        }
        if(s.isPrime()){
            System.out.println(s.n + "是素数");
        }
    }
    public static void main5(String[] args){
        StopWatch s = new StopWatch();
        System.out.println("[开始计时]");
        s.start();
        for(int i = 0; i < 3; i++){
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        s.stop();
        System.out.println("[计时结束]:用时(ms)：" + s.getElapsedTime());
    }
    public static void main4(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.print("请输入a，b，c：");
        int a = in.nextInt();
        int b = in.nextInt();
        int c = in.nextInt();
        QuadraticEquation s = new QuadraticEquation(a, b, c);
        System.out.println("判别式为：" + s.getDiscriminant());
        if (s.getDiscriminant() > 0){
            System.out.println("两个根为：r1 = " + s.getRoot1()
                    + " r2 = " + s.getRoot2());
        }else if(s.getDiscriminant() == 0){
            System.out.println("根为：r = " + s.getRoot1());
        }else{
            System.out.println("The equation has no roots.");
        }
    }
    public static void main3(String[] args) {
        RegularPolygon s1 = new RegularPolygon();
        RegularPolygon s2 = new RegularPolygon(6,4);
        RegularPolygon s3 = new RegularPolygon(10,4,5.6,7.8);
        System.out.println("s1的周长：" + s1.getPerimeter() + "面积:" + s1.getArea());
        System.out.println("s2的周长：" + s2.getPerimeter() + "面积:" + s2.getArea());
        System.out.println("s3的周长：" + s3.getPerimeter() + "面积:" + s3.getArea());
    }
    public static void main2(String[] args) {
        Fan s1 = new Fan();
        Fan s2 = new Fan();
        s1.setSpeed(Fan.FAST);
        s1.setRadius(10);
        s1.setColor("yellow");
        s1.setOn(true);
        s2.setSpeed(Fan.MEDIUM);
        s2.setRadius(5);
        System.out.println("风扇1：\n" + s1.toString());
        System.out.println("风扇2：\n" + s2.toString());
    }
    public static void main1(String[] args) {
        Account s = new Account(1122, 20000);
        s.setAnnualInterestRate(0.045);
        s.withDraw(2500);
        s.deposit(3000);
        System.out.println("余额：" + s.balance +"元");
        System.out.println("月利息：" + s.getMonthlyInterestRate());
        System.out.println("开户日期：" + s.dateCreated);
    }
}
